package com.itcoon.cloud.framework.security.config.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * @author Administrator
 * created in 2021/4/15
 */
@ConfigurationProperties(prefix = "itcoon.web.security.jwt")
public class JwtTokenProperties {

	/**
	 * 过期时间,单位秒
	 */
	private Long tokenExpiration = 60 * 30L;

	/**
	 * 刷新时间，单位秒
	 */
	private Long refreshExpiration = 60 * 60 * 2L;

	/**
	 * Token Header
	 */
	private String headerName = "Authorization";

	/**
	 * token 前缀
	 */
	private String tokenValPrefix = "Bearer ";

	/**
	 * 签名串
	 */
	private String signKey = "SIGN_KEY";

	/**
	 * 是否激活
	 */
	private boolean enable = false;

	public Long getTokenExpiration() {
		return tokenExpiration;
	}

	public void setTokenExpiration(Long tokenExpiration) {
		this.tokenExpiration = tokenExpiration;
	}

	public Long getRefreshExpiration() {
		return refreshExpiration;
	}

	public void setRefreshExpiration(Long refreshExpiration) {
		this.refreshExpiration = refreshExpiration;
	}

	public String getHeaderName() {
		return headerName;
	}

	public void setHeaderName(String headerName) {
		this.headerName = headerName;
	}


	public String getTokenValPrefix() {
		return this.tokenValPrefix;
	}

	public void setTokenValPrefix(String tokenValPrefix) {
		this.tokenValPrefix = tokenValPrefix;
	}

	public String getSignKey() {
		return signKey;
	}

	public void setSignKey(String signKey) {
		this.signKey = signKey;
	}

	public boolean isEnable() {
		return enable;
	}

	public void setEnable(boolean enable) {
		this.enable = enable;
	}

}
